import yagmail,logging

def log():
    log = logging.basicConfig(
        level=logging.DEBUG,
        filename=r'E:\gg4\gaoliu\UI_web_A3mall\log/a3mall.log',
        filemode='a+',
        format='%(levelname)s-%(filename)s-%(asctime)s-%(message)s-%(lineno)d'
    )
    return log

def mail():
    mail = yagmail.SMTP(user='3080172040@qq.com',password='abhdfnpkqkmadgff',host='smtp.qq.com')
    mail.send(to='3080172040@qq.com',
              subject='a3mall报告,请查收',
              contents=['a3mall业务通过',
                        r'E:\gg4\gaoliu\UI_web_wms\log/a3mall.log'
                        ]
              )
